﻿using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
using System.Text;
using WebInterface;
using WebReposity.Models;

namespace WebServices
{
    public class WebApiServiceA : IWebApiServiceA
    {
        private readonly ILogger<WebApiServiceA> _logger;

        public WebApiServiceA(ILogger<WebApiServiceA> logger)
        {
            _logger = logger;
        }

        public int AddValue(int a, int b)
        {
            return a + b;
        }

        public double DeivdeValue(double a, double b)
        {
            _logger.LogInformation($"start to cal: {a} / {b}");
            return a / b;
        }

        public string DoSometing(WebApiDtoA a, WebApiDtoB b)
        {
            return $"{a.D1}+{a.D2}+{b.I1}+{b.S1}";
        }

        public string DoEasything(WebApiDtoB b)
        {
            return $"{b.I1}+{b.S1}";
        }
    }
}
